#!/usr/bin/python
# -*- coding: utf-8 -*-
# 曹志强
# 获取model信息
# 2019.12.26

def get_model_fieldName(model, field):
    """
    获取model的verbose_name和name的字段, exclude 过滤掉的字段
    """
    # model_obj = apps.get_model(appname, modelname)
    filed = model._meta.fields
    params = [f for f in filed if f.name]
    for i in params:
        if i.name == field:
            return i.verbose_name
    return None